/*
package com.example.authservice.controller;

import cn.dev33.satoken.stp.StpUtil;
import cn.dev33.satoken.util.SaResult;
import com.example.authservice.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/auth")
public class LoginController {

    @Autowired
    private AuthService authService;

    */
/**
     * 用户登录
     *//*

    @PostMapping("/login")
    public SaResult login(
            @RequestParam String username,
            @RequestParam String password) {

        // 验证用户名密码
        if(authService.validateUser(username, password)) {
            // 登录并返回token
            StpUtil.login(username);
            return SaResult.ok("登录成功")
                   .setData(StpUtil.getTokenInfo());
        }
        return SaResult.error("用户名或密码错误");
    }

    */
/**
     * 退出登录
     *//*

    @PostMapping("/logout")
    public SaResult logout() {
        StpUtil.logout();
        return SaResult.ok("退出成功");
    }

    */
/**
     * 查询登录状态
     *//*

    @GetMapping("/isLogin")
    public SaResult isLogin() {
        return SaResult.data(StpUtil.isLogin());
    }
}*/
